﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace GH.Web.SystemManage
{
    public partial class UserManage1 : GH.Web.BasePage.PageBase
    {
        #region 画面初始化

        protected void Page_Load(object sender, EventArgs e)
        {
            SetGridShow();
        }

        #endregion

        #region 画面方法

        private void SetGridShow()
        {
            GH.BLL.User bllUser = new GH.BLL.User();
            this.rptList.DataSource = bllUser.GetUserList().Tables[0];
            this.rptList.DataBind();
        }

        /// <summary>
        /// 单位信息下拉列表
        /// </summary>
        private void SetComboListUnit()
        {
            DataSet ds = new DataSet();
            GH.BLL.Union unitInfo = new GH.BLL.Union();
            ds = unitInfo.GetList("");

            //空白の行
            DataRow dr;
            dr = ds.Tables[0].NewRow();
            dr["单位代码"] = -1;
            dr["单位名称"] = "";
            ds.Tables[0].Rows.InsertAt(dr, 0);

            ddlUion.DataValueField = "单位代码";
            ddlUion.DataTextField = "单位名称";
            this.ddlUion.DataSource = ds;
            this.ddlUion.DataBind();

        }

        /// <summary>
        /// 部门信息下拉列表
        /// </summary>
        private void SetComboListDepartM()
        {
            DataSet ds = new DataSet();
            GH.BLL.DepartMent departMInfo = new GH.BLL.DepartMent();
            ds = departMInfo.GetList("");

            //空白の行
            DataRow dr;
            dr = ds.Tables[0].NewRow();
            dr["部门代码"] = 1;
            dr["部门名称"] = "";
            ds.Tables[0].Rows.InsertAt(dr, 0);

            ddlDepartment.DataValueField = "部门代码";
            ddlDepartment.DataTextField = "部门名称";
            this.ddlDepartment.DataSource = ds;
            this.ddlDepartment.DataBind();

        }

        /// <summary>
        /// 部门信息下拉列表
        /// </summary>
        private void SetComboListRole()
        {
            //DataSet ds = new DataSet();
            //GH.BLL.DeprtMent departMInfo = new GH.BLL.DepartMent();
            //ds = departMInfo.GetList("");

            ////空白の行
            //DataRow dr;
            //dr = ds.Tables[0].NewRow();
            //dr["部门代码"] = 1;
            //dr["部门名称"] = "";
            //ds.Tables[0].Rows.InsertAt(dr, 0);

            //ddlDepartment.DataValueField = "部门代码";
            //ddlDepartment.DataTextField = "部门名称";
            //this.ddlDepartment.DataSource = ds;
            //this.ddlDepartment.DataBind();

        }

       #endregion
    }
}
